public class db_where_condition {
	public db_column oColumn1 = null;
	public db_column oColumn2 = null;

	public int iCompareOperator = 0;
	public String sValue1 = "";
	public String sValue2 = "";
	public int iType1 = 0;
	public int iType2 = 0;
	
	db_where_condition (String sValueStr1, String sValueStr2, int iDataType1, int iDataType2, int iCompOp){
		sValue1 = sValueStr1;
		sValue2 = sValueStr2;
		iType1 = iDataType1;
		iType2 = iDataType2;
		iCompareOperator = iCompOp;
	}
		
	public boolean eval(int iVal1, int iVal2) {
		switch (iCompareOperator) {
			case 1: return (iVal1 == iVal2); 
			case 2: return (iVal1 <= iVal2); 
			case 3: return (iVal1 >= iVal2); 
			case 4: return (iVal1 < iVal2); 
			case 5: return (iVal1 > iVal2); 
		}
		return false;
	}
}
